/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package post;

import java.io.Serializable;

/**
 *
 * @author Stephen
 */
public class Product implements Serializable, Comparable{
    
    private String upc;
    private String description;
    private float price;
    
    public Product(String upc, String description, float price) {
        this.upc = upc;
        this.description = description;
        this.price = price;
    }
    
    public String getUpc() {
        return this.upc;
    }
    
    public String getDescription() {
        return this.description;
    }
    
    public float getPrice() {
        return this.price;
    }

    @Override
    public int compareTo(Object o) {
        return this.upc.compareTo(((Product)o).getUpc());
    }
}
